<#include "../base/basic-page.ftl">
<#include "../common/table.ftl">
<#include "../common/modal.ftl">
<#include "../common/form.ftl">
<#include "../common/pagination.ftl">
<@page_head>

</@page_head>
<@page_body page_title="交易管理" side_active="/admin/trading/draw-cash">
    <div class="main-content container-fluid">
        <div class="row">
            <!--Responsive table-->
            <div class="col-sm-12">
                <@table_wrap "提现申请表">
                <@table_tools>
                    <button class="btn btn-space btn-primary"
                            data-toggle="modal"
                            data-target="#create">
                        申请报备
                    </button>
                </@table_tools>
                <@table extra="table-striped table-hover">
                    <@table_head>
                        <th style="width:10%;">会员信息</th>
                        <th style="width:10%;">会员手机号码</th>
                        <th style="width:5%;" class="number">提现金额/元</th>
                        <th style="width:5%;">提现状态</th>
                        <th style="width:10%;">更新时间</th>
                        <th style="width:10%;">申请时间</th>
                        <th style="width:10%;"></th>
                    </@table_head>
                    <@table_body>
                    <#list recordData.records as item>
                        <tr>
                            <td class="user-avatar cell-detail user-info">
                                <img class="mt-0 mt-md-2 mt-lg-0" src="/static/img/img-avatar-1.png" alt="Avatar">
                                <span>${(item.userName)!'无昵称'}</span>
                                <span class="cell-detail-description">ID:${item.userId}</span>
                            </td>
                            <td>
                                ${item.number}
                            </td>
                            <td class="number">
                                ￥${item.data.amount?string['0.00']}元
                            </td>
                            <td>
                                ${item.data.statusStr}
                            </td>
                            <td class="cell-detail">
                                <span>${item.data.uTime?string('yyyy年MM月dd日')}</span>
                                <span class="cell-detail-description">${item.data.uTime?string('HH:mm')}</span>
                            </td>
                            <td class="cell-detail">
                                <span>${item.data.cTime?string('yyyy年MM月dd日')}</span>
                                <span class="cell-detail-description">${item.data.cTime?string('HH:mm')}</span>
                            </td>
                            <td class="text-right">
                            <#--<button class="btn btn-space btn-secondary">立即打款</button>-->
                                <div class="btn-group btn-hspace">
                                    <button class="btn btn-secondary dropdown-toggle" type="button" data-toggle="dropdown">
                                        更新状态<span class="icon-dropdown mdi mdi-chevron-down"></span>
                                    </button>
                                    <div class="dropdown-menu" role="menu">
                                        <a id="record-${item.data.id}-status-2"
                                           class="dropdown-item" href="javascript:;">打款中</a>
                                        <a id="record-${item.data.id}-status-3"
                                           class="dropdown-item" href="javascript:;">已收款</a>
                                    </div>
                                </div>
                            </td>
                        </tr>
                    </#list>

                    </@table_body>
                </@table>
                    <@pagination recordData.current,recordData.size,recordData.total>
                    </@pagination>
                </@table_wrap>
            </div>
        </div>
    </div>
    <@modal id='create'>
        <@modal_header title="提现申请报备">

        </@modal_header>
        <@formNovalidate id='form-create' class=''>
            <@modal_body>
        <div class="form-group">
            <label for="input-number">用户手机号码</label>
            <input class="form-control form-control-xs"
                   id="input-number" name="number"
                   autocomplete="off" type="text"
                   required data-parsley-error-message="请输入用户手机号码"
                   placeholder="请输入用户手机号码">
        </div>
    <div class="form-group">
        <label for="input-amount">申请金额</label>
        <input class="form-control form-control-xs"
               id="input-amount" name="amount"
               autocomplete="off" type="number"
               required data-parsley-error-message="请输入提现申请金额"
               placeholder="请输入提现申请金额">
    </div>
            </@modal_body>
            <@modal_footer>
        <button class="btn btn-secondary md-close" type="button" data-dismiss="modal">取消</button>
        <button class="btn btn-primary md-close" type="submit">确认</button>
            </@modal_footer>
        </@formNovalidate>
    </@modal>
</@page_body>
<@page_foot>
<script src="/static/lib/parsley/parsley.min.js" type="text/javascript"></script>
<script type="text/javascript">
    $(document).ready(function(){
        //initialize the javascript
        var cli = new S7BuyCli();
        cli.init();
        cli.initDrawCash();
    });
</script>
</@page_foot>